﻿<!--
Project: ClipFlair (http://ClipFlair.codeplex.com)
Filename: BaseOptions.xaml
Version: 20150204
-->

<UserControl x:Class="ClipFlair.Windows.Options.BaseOptions"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:color="clr-namespace:ColorPickerLib;assembly=ColorPicker"
  mc:Ignorable="d"
  d:DesignHeight="700" d:DesignWidth="424"
  >

  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ClipFlair.Windows.Base;component/Themes/Generic.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </UserControl.Resources>

  <StackPanel
    Name="PropertiesPanelBase"
    Orientation="Vertical"
    Margin="10,10,10,10"
    HorizontalAlignment="Stretch"
    >

    <StackPanel.Resources>
      <Style TargetType="StackPanel" BasedOn="{StaticResource PropertyStackPanelStyle}" />
      <Style TargetType="Grid" BasedOn="{StaticResource PropertyGridStyle}" />
      <Style TargetType="Label" BasedOn="{StaticResource PropertyLabelStyle}" />
    </StackPanel.Resources>

    <!--
    <StackPanel Orientation="Vertical" Name="propID">
      <Label
        Content="ID:"
        Target="{Binding ElementName=edID}"
        />
      <TextBox
        Name="edID"
        Text="{Binding ID, Mode=TwoWay}"
        />
    </StackPanel>
    -->

    <!-- X & Y -->

    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>

      <StackPanel Grid.Column="0" Orientation="Vertical" Name="propX" Margin="0,0,5,0">
        <Label
          Content="X:"
          Target="{Binding ElementName=edX}"
          />
        <TextBox
          Name="edX"
          Text="{Binding X, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
          />
      </StackPanel>

      <StackPanel Grid.Column="1" Orientation="Vertical" Name="propY" Margin="5,0,0,0">
        <Label
          Content="Y:"
          Target="{Binding ElementName=edY}"
          />
        <TextBox
          Name="edY"
          Text="{Binding Y, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
          />
      </StackPanel>

    </Grid>

    <!-- Width & Height -->

    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>

      <StackPanel Grid.Column="0" Orientation="Vertical" Name="propWidth" Margin="0,0,5,0">
        <Label
          Content="Width:"
          Target="{Binding ElementName=edWidth}"
          />
        <TextBox
          Name="edWidth"
          Text="{Binding Width, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
          />
      </StackPanel>

      <StackPanel Grid.Column="1" Orientation="Vertical" Name="propHeight" Margin="5,0,0,0">
        <Label
          Content="Height:" Target="{Binding ElementName=edHeight}"
          />
        <TextBox
          Name="edHeight"
          Text="{Binding Height, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
          />
      </StackPanel>

    </Grid>

    <!-- Zoom -->

    <StackPanel Orientation="Vertical" Name="propZoom">
      <Label
        Content="Zoom:"
        Target="{Binding ElementName=edZoom}"
        />
      <TextBox
        Name="edZoom"
        Text="{Binding Zoom, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
        />
      <!-- can't use a slider here, since the grabbed slider thumb would move away from the mouse while zooming in/out -->
    </StackPanel>

    <!-- ZIndex -->

    <StackPanel Orientation="Vertical" Name="propZIndex">
      <Label
        Content="Z-order layer index:"
        Target="{Binding ElementName=edZIndex}"
        />
      <TextBox
        Name="edZIndex"
        Text="{Binding ZIndex, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
        />
    </StackPanel>

    <!-- Opacity -->

    <StackPanel Orientation="Vertical" Name="propOpacity">
      <Label
        Content="Opacity:"
        Target="{Binding ElementName=sldOpacity}"
        />
      <!-- <TextBox Name="edOpacity" Text="{Binding Opacity, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
      <Slider
        Name="sldOpacity"
        Value="{Binding Opacity, Mode=TwoWay}"
        Minimum="0.1"
        Maximum="1"
        SmallChange="0.05"
        LargeChange="0.1"
        Orientation="Horizontal"
        />
    </StackPanel>

    <!-- TitleForegroundColor -->

    <StackPanel Orientation="Vertical" Name="propTitleForegroundColor">
      <Label
        Content="Title Foreground Color:" Target="{Binding ElementName=edTitleForegroundColor}"
        />
      <color:ColorPicker
        Color="{Binding TitleForegroundColor, Mode=TwoWay}"
        />
      <!-- <TextBox Name="edTitleForegroundColor" Text="{Binding TitleForegroundColor, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
    </StackPanel>

    <!-- TitleBackgroundColor -->

    <StackPanel Orientation="Vertical" Name="propTitleBackgroundColor">
      <Label
        Content="Title Background Color:" Target="{Binding ElementName=edTitleBackgroundColor}"
        />
      <color:ColorPicker
        Color="{Binding TitleBackgroundColor, Mode=TwoWay}"
        />
      <!-- <TextBox Name="edTitleBackgroundColor" Text="{Binding TitleBackgroundColor, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
    </StackPanel>

    <!-- BackgroundColor -->

    <StackPanel Orientation="Vertical" Name="propBackgroundColor">
      <Label
        Content="Background Color:" Target="{Binding ElementName=edBackgroundColor}"
        />
      <color:ColorPicker
        Color="{Binding BackgroundColor, Mode=TwoWay}"
        />
      <!-- <TextBox Name="edBackgroundColor" Text="{Binding BackgroundColor, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
    </StackPanel>

    <!-- BorderColor -->

    <StackPanel Orientation="Vertical" Name="propBorderColor">
      <Label
        Content="Border Color:" Target="{Binding ElementName=edBorderColor}"
        />
      <color:ColorPicker
        Color="{Binding BorderColor, Mode=TwoWay}"
        />
      <!-- <TextBox Name="edBorderColor" Text="{Binding BorderColor, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> -->
    </StackPanel>

    <!-- BorderThickness -->

    <StackPanel Orientation="Vertical" Name="propBorderThickness">
      <Label
        Content="Border Thickness:" Target="{Binding ElementName=edBorderThickness}"
        />
      <TextBox
        Name="edBorderThickness"
        Text="{Binding BorderThickness, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
        />
    </StackPanel>

    <!-- CornerRadius -->

    <StackPanel Orientation="Vertical" Name="propCornerRadius">
      <Label 
        Content="Corner Radius:" Target="{Binding ElementName=edCornerRadius}"
        />
      <TextBox
        Name="edCornerRadius"
        Text="{Binding CornerRadius, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
        />
    </StackPanel>

    <!-- Moveable -->

    <StackPanel Orientation="Horizontal" Name="propMoveable">
      <CheckBox 
        Name="cbMoveable" 
        IsChecked="{Binding Moveable, Mode=TwoWay}"
        />
      <Label
        Content="Moveable"
        Target="{Binding ElementName=cbMoveable}"
        />
    </StackPanel>

    <!-- Resizable -->

    <StackPanel Orientation="Horizontal" Name="propResizable">
      <CheckBox 
        Name="cbResizable" 
        IsChecked="{Binding Resizable, Mode=TwoWay}" 
        />
      <Label 
        Content="Resizable" 
        Target="{Binding ElementName=cbResizable}"
        />
    </StackPanel>

    <!-- Zoomable -->

    <StackPanel Orientation="Horizontal" Name="propZoomable">
      <CheckBox
        Name="cbZoomable"
        IsChecked="{Binding Zoomable, Mode=TwoWay}"
        />
      <Label
        Content="Zoomable" 
        Target="{Binding ElementName=cbZoomable}"
        />
    </StackPanel>

    <!-- WarnOnClosing -->

    <StackPanel Orientation="Horizontal" Name="propWarnOnClosing">
      <CheckBox 
        Name="cbWarnOnClosing" 
        IsChecked="{Binding WarnOnClosing, Mode=TwoWay}"
        />
      <Label 
        Content="Warn on closing" 
        Target="{Binding ElementName=cbWarnOnClosing}"
        />
    </StackPanel>

    <!-- TitlebarVisible -->

    <StackPanel Orientation="Horizontal">
      <CheckBox
        Name="cbTitlebarVisible"
        IsChecked="{Binding TitlebarVisible, Mode=TwoWay}"
        />
      <Label
        Content="Titlebar Visible"
        Target="{Binding ElementName=cbTitlebarVisible}"
        />
    </StackPanel>

  </StackPanel>
  
</UserControl>